<template>
  <div class="box" />
  我是demo2
</template>

<script setup lang="ts">
import { ref, reactive, onBeforeMount, onUnmounted } from 'vue'
import mittBus from '@/utils/mitt'
const demo = ref('')
onBeforeMount(() => {
    mittBus.on('fashe', res => {
        console.log(res)
    })
})
onUnmounted(() => {
    console.log('组件销毁')
    mittBus.off('fashe', val => {
        console.log(val)
    })
})
</script>

<style lang="less" scoped>
.box {
}
</style>
